Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: minor fix in identifying user #302

Merged
merged 1 commit into from
Aug 16, 2024

Conversation

ami-aman
Copy link
Collaborator

Regarding the conversation on the other PR: I updated the code but forgot to push it to the same PR.

@ami-aman ami-aman requested a review from a team August 16, 2024 11:35
}
CustomerIO.shared.identify(userId: userId, traits: traits)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wouldn't this fail if traits are being attached to anonymous profile? Or do you plan to expose separate method for anonymous case?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you mean if traits is nil ?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No. I mean, when profile is anonymous i.e. userId is nil. But customer wants to attach traits to anonymous profile. Similar to this method in iOS.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, you’re right. This doesn’t meet the anonymous profile criteria. Iwilll go ahead and update it.

Copy link
Collaborator Author

@ami-aman ami-aman Aug 16, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rehan, I just realized that user identification is covered under a separate ticket, which will also address anonymous profiles.
I think it’s best to leave this change for that ticket to avoid scope creep. I understand that this condition doesn’t resolve the anonymous criteria, but I suggest handling it in the upcoming ticket.​

Though this current change is also a scope creep but I wanted to do it to help testing the package better and as quick as we can.

I am dropping a note in the ticket so that this fix is not overlooked. Does that make sense?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense, since the ticket will make any necessary changes required to handle the case for anonymous profile, I'm good with it 👍🏻

@ami-aman ami-aman requested a review from mrehan27 August 16, 2024 15:00
@ami-aman ami-aman merged commit 8d3ad14 into feature/cdp-milestone-one Aug 16, 2024
1 of 5 checks passed
@ami-aman ami-aman deleted the feature/fixing-identify-call branch August 16, 2024 17:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants